/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kasgroup2;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.ArrayList;

/**
 *
 * @author beha
 */
public class ObjectSerializer {
    public void SerializeHotels(ArrayList<Hotel> o) {
        try
        {
            FileOutputStream fileOut = new FileOutputStream("hotels.ser");
            ObjectOutputStream out = new ObjectOutputStream(fileOut);
            //System.out.println(out);
            out.writeObject(o);
            out.close();
            fileOut.close();
        }catch(IOException i)
        {
            i.printStackTrace();
        }
    }
}
